package com.dt.zbcy.provider.web.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.dt.zbcy.provider.web.dao.MjzUserInfoMapper;
import com.dt.zbcy.provider.web.dto.ReqMjzDto;
import com.dt.zbcy.provider.web.entity.MjzUserInfoEntity;
import com.dt.zbcy.provider.web.service.IMjzUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: liuwenxiang
 * @Date: 2019/3/31 00:54
 * @Description:
 */
@Service
public class MjzUserInfoImpl extends ServiceImpl<MjzUserInfoMapper, MjzUserInfoEntity> implements IMjzUserInfoService {

    @Autowired
    private MjzUserInfoMapper mjzUserInfoMapper;

    @Override
    public List<MjzUserInfoEntity> selectListByPage(ReqMjzDto req){
        return mjzUserInfoMapper.selectListByPage(req);
    }

    @Override
    public long selectAmount(ReqMjzDto req){
        return mjzUserInfoMapper.selectAmount(req);
    }

    @Override
    public MjzUserInfoEntity selectUserByUserName(String username) {
        MjzUserInfoEntity user = new MjzUserInfoEntity();
        user.setName(username);
        return mjzUserInfoMapper.selectOne(user);
    }
}
